/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
* @website https://el-admin.vip
* @description /
* @author zhaoxiancheng
* @date 2021-11-28
**/
@Entity
@Data
@Table(name="wx_user")
public class WxUser implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID")
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Column(name = "NICKNAME")
    @ApiModelProperty(value = "微信昵称")
    private String nickname;

    @Column(name = "SEX")
    @ApiModelProperty(value = "性别")
    private String sex;

    @Column(name = "LANGUAGE")
    @ApiModelProperty(value = "language")
    private String language;

    @Column(name = "CITY")
    @ApiModelProperty(value = "城市")
    private String city;

    @Column(name = "PROVINCE")
    @ApiModelProperty(value = "省份")
    private String province;

    @Column(name = "COUNTRY")
    @ApiModelProperty(value = "国家")
    private String country;

    @Column(name = "HEADIMGURL")
    @ApiModelProperty(value = "头像")
    private String headimgurl;

    @Column(name = "SUBSCRIBE")
    @ApiModelProperty(value = "subscribe")
    private String subscribe;

    @Column(name = "SUBSCRIBE_TIME")
    @ApiModelProperty(value = "关注时间")
    private String subscribeTime;

    @Column(name = "UNIONID")
    @ApiModelProperty(value = "unionid")
    private String unionid;

    @Column(name = "REMARK")
    @ApiModelProperty(value = "描述")
    private String remark;

    @Column(name = "GROUPID")
    @ApiModelProperty(value = "groupid")
    private String groupid;

    @Column(name = "TAGID_LIST")
    @ApiModelProperty(value = "tagidList")
    private String tagidList;

    @Column(name = "STATUS")
    @ApiModelProperty(value = "status")
    private String status;

    @Column(name = "MOBILE")
    @ApiModelProperty(value = "手机号")
    private String mobile;

    @Column(name = "open_id")
    @ApiModelProperty(value = "openId")
    private String openId;

    @Column(name = "personality")
    @ApiModelProperty(value = "性格类型")
    private String personality;

    @Column(name = "profession")
    @ApiModelProperty(value = "职业")
    private String profession;

    @Column(name = "company")
    @ApiModelProperty(value = "公司")
    private String company;

    @Column(name = "superior")
    @ApiModelProperty(value = "上级")
    private String superior;

    @Column(name = "superior_nick_name")
    @ApiModelProperty(value = "上级微信昵称")
    private String superiorNickName;

    @Column(name = "superior_real_name")
    @ApiModelProperty(value = "上级真实姓名")
    private String superiorRealName;

    @Column(name = "superior_mobile")
    @ApiModelProperty(value = "上级手机号")
    private String superiorMobile;

    @Column(name = "real_name")
    @ApiModelProperty(value = "真实姓名")
    private String realName;

    @Column(name = "address")
    @ApiModelProperty(value = "收获地址")
    private String address;

    @Column(name = "identity_no")
    @ApiModelProperty(value = "身份编码")
    private String identityNo;

    @Column(name = "identity_name")
    @ApiModelProperty(value = "身份名称")
    private String identityName;

    @Column(name = "birthday")
    @ApiModelProperty(value = "生日")
    private String birthday;

    @Column(name = "lock_time")
    @ApiModelProperty(value = "锁客时间")
    private Timestamp lockTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Timestamp updateTime;

    @Column(name = "partner_id")
    @ApiModelProperty(value = "合伙人ID")
    private Long partnerId;

    @Column(name = "partner_name")
    @ApiModelProperty(value = "合伙人名称")
    private String partnerName;

    @Column(name = "ticket_number")
    @ApiModelProperty(value = "门票数量")
    private Integer ticketNumber;


    public void copy(WxUser source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}